import { Component } from '@angular/core';
import { Select, Store } from '@ngxs/store';
import { System, SystemSelector } from './store';
import { Observable } from 'rxjs';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
})
export class AppComponent {
  @Select(SystemSelector.collapsed) isCollapsed$!: Observable<boolean>;

  constructor(
      private store: Store,
  ) {
  }

  collapsedReversal() {
    this.store.dispatch(new System.CollapsedReversal());
  }
}
